package com.fsserver.core.service;

import com.fsserver.core.dto.RefundRequestDTO;
import com.fsserver.core.entity.Refund;
import com.fsserver.core.vo.RefundResponseVO;

import java.util.List;
import java.util.Map;

/**
 * 退款服务接口
 * Refund Service
 *
 * @author fsserver
 */
public interface RefundService {

    /**
     * 创建退款
     * Create refund
     *
     * @param refundRequestDTO 退款请求DTO
     * @return 退款响应
     */
    RefundResponseVO createRefund(RefundRequestDTO refundRequestDTO);

    /**
     * 查询退款
     * Query refund
     *
     * @param refundNo 退款号
     * @return 退款
     */
    Refund queryRefund(String refundNo);

    /**
     * 根据订单号查询退款列表
     * List refunds by order number
     *
     * @param orderNo 订单号
     * @return 退款列表
     */
    List<Refund> listRefundsByOrderNo(String orderNo);

    /**
     * 根据交易号查询退款列表
     * List refunds by transaction number
     *
     * @param transactionNo 交易号
     * @return 退款列表
     */
    List<Refund> listRefundsByTransactionNo(String transactionNo);

    /**
     * 处理退款通知
     * Handle refund notification
     *
     * @param paymentType 支付类型
     * @param params      通知参数
     * @return 是否成功
     */
    boolean handleRefundNotification(String paymentType, Map<String, String> params);
} 